package cn.fsd.util;

public class RedisKey {
    //已安排进货的缺货订单队列
    private static final String StockOutOrder="StockOutOrderQueue:";
    //订单id-地址字符串
    private static final String OrderAddress="OrderAddress:";
    //订单id-中心库房id
    private static final String OrderStoreroom="OrderStoreroom:";
    //已退订的订单set，自动处理缺货订单时，若订单在该set中，跳过并删除set中元素
    private static final String CanceledOrder="CanceledOrder:";
    //手动挂起的订单set，入库后可以自动或手动挂起（即将商品分配给订单，等待客服中心将其变为已分配订单）
    //手动挂起需要指定订单并将货物变为已分配，之后变为挂起状态，将订单放入set
    //自动处理缺货订单时，若订单在该set中，跳过并删除set中元素
    private static final String ManualHandledOrder="ManualHandledOrder:";


    public static String getStockOutOrderQueueKey(String storeroom_id,String commodity_id) {
        return StockOutOrder+storeroom_id+":"+commodity_id;
    }

    public static String getOrderAddressKey(String order_id){
        return OrderAddress+order_id;
    }

    public static String getOrderStoreroomKey(String order_id){
        return OrderStoreroom+order_id;
    }

    public static String getCanceledOrderSetKey(){
        return CanceledOrder;
    }

    public static String getManualHandledOrderKey(){
        return ManualHandledOrder;
    }

}
